/* syscalls.h 
 * 	Nachos system call interface.  These are Nachos kernel operations
 * 	that can be invoked from user programs, by trapping to the kernel
 *	via the "syscall" instruction.
 *
 *	This file is included by user programs and by the Nachos kernel. 
 *
 * Copyright (c) 1992-1993 The Regents of the University of California.
 * All rights reserved.  See copyright.h for copyright notice and limitation 
 * of liability and disclaimer of warranty provisions.
 */

#ifndef SYSCALLS2_H
#define SYSCALLS2_H

#include "copyright.h"

/* system call codes -- used by the stubs to tell the kernel which system call
 * is being asked for
 */
#define SC_CreateMV			31
#define SC_GetMV			32
#define SC_SetMV			33
#define SC_DestroyMV		34

/*DYH Messages*/
#define DYH_Lock			35
#define DYH_Cond			36
#define DYH_MV				37
#define HAVE_Lock			38
#define HAVE_Cond			39
#define HAVE_MV				40
#define NO_Lock				41
#define NO_Cond				42
#define NO_MV				43
#define IST_LockExists		48
#define IST_BadLock			49
#define IST_GoodLock		50

/*Binder Messages*/
#define BIND_Add			44
#define BIND_Remove			45
#define BIND_List			46 /*use this for request and reply, just handle differently in server and binder*/
#define BIND_Rand			47 /*for clients to get server. the above applies here too*/

/*PING message*/
#define RPC_Ping			255

#define MAXFILENAME 256

#ifndef IN_ASM

int CreateMV(int rows, int cols, int len, unsigned int vaddr);

int GetMV(int index, int row, int col);

void SetMV(int index, int row, int col, int val);

void DestroyMV(int index);

#endif /* IN_ASM */

#endif /* SYSCALLS2_H */
